package com.shenmazong.state;

import io.swagger.models.auth.In;

public enum ApprovalStatus {
    NO("未审批", 0), YES("已审批", 1), LOCK("已锁定", 2);

    // 成员
    private String name;
    private Integer code;

    // 构造方法
    private ApprovalStatus(String name, int code) {
        this.name = name;
        this.code = code;
    }

    // 普通方法
    public static String getName(int code) {
        for (ApprovalStatus c : ApprovalStatus.values()) {
            if (c.getCode() == code) {
                return c.name;
            }
        }
        return null;
    }
    // get set 方法
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getCode() {
        return code;
    }
    public void setCode(int code) {
        this.code = code;
    }
}
